package yaty.lee.ssh2.action;

import java.util.List;

import yaty.lee.ssh2.model.Person;
import yaty.lee.ssh2.service.PersonService;

import com.opensymphony.xwork2.ActionSupport;

public class AllPersonsFinder extends ActionSupport {
	private static final long serialVersionUID = 5526142872470486026L;
	private List<Person> persons;
	private transient PersonService personService;

	@Override
	public String execute() throws Exception {
		persons = personService.findAllEmployees();
		return SUCCESS;
	}

	public List<Person> getPersons() {
		return persons;
	}

	public void setPersonService(PersonService personService) {
		this.personService = personService;
	}

}
